@extends('Admin.layouts.common')

@section('content')
    <div class="container myContainer">

        
        <div class="search_box">
            
        </div>

        <div id="order_tag"></div>

        <div class="table-responsive">
            <table class="table">
                <caption style="font-size: 14px">合伙人正在排队付款（{{ $total}} 请刷新页面更新数据）</caption>
                <thead>
                    <tr>
                        <th>#</th>
                        <th>姓名</th>
                        <th>金额</th>
                        <th>Payment</th>
                        <th>-</th>
                    </tr>
                </thead>
                <tbody>
                    @forelse($list as $item)
                        <tr id="tr_{{$item->id}}">
                            <td>{{ $item->id }}</td>
                            <td>{{ $item->real_name }}</td>
                            <td>{{ $item->money }}</td>
                            <td>{{ $item->payment_id==1?'微信':'支付宝' }}</td>
                            <td>正在排队中付款中</td>
                        </tr>
                    @empty
                        <tr><td class="text-center" colspan="9">没有数据</td></tr>
                    @endforelse
                </tbody>
            </table>
            <div class="text-center">
              
            </div>
        </div>

    </div>
    <link href="{{ asset('libs/select2/select2.min.css') }}" rel="stylesheet">
<script src="{{ asset('libs/select2/select2.min.js') }}"></script>
<script src="{{ asset('libs/select2/zh-CN.js') }}"></script>
<script type="text/javascript">
$("#uid").select2({
    language: "zh-CN",
    ajax:{
        url: "/Users/ajax_select2_user",
        dataType: 'json',
        delay: 600,
        method: 'POST',
        data: function (params) {
            return {
                name: params.term,
            };
        },
        processResults: function (data, params) {
            return {
                results: data.data,
            };
        },
        cache: true
    },
    placeholder:'请输入手机号码',
    allowClear: true,
    escapeMarkup: function (markup) { return markup; },
    minimumInputLength: 11,
    templateResult: function(repo){ return repo.name; },
    templateSelection: function(repo){ 
        if(repo.id === ""){
            return repo.text
        }else{
            if(repo.selected == true){
                return repo.text
            }
            return repo.name
        }
         
    } 
});
</script>

<script type="text/javascript">
$.ajaxSetup({
    headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
})

function ajax_delete_theme(id){
    if(confirm('确认删除吗?')){
        $.post("/admins/ajax_delete_admin/"+id,{},function(json){
            if(json.status==1){
                $("#tr_"+json.data).fadeOut();
            }else{
                alert(json.info);
            }
        },"json");
    } 
}
</script>
@endsection